package com.o2o.app.userCenter;

import com.o2o.app.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MineFamilyDesActivity extends Activity {
	// 家庭介绍
	private static final int FORFAMILYDES = 5560;

	/**
	 * 保存按钮
	 */
	private Button btn_pass;

	/**
	 * 输入框
	 */
	private EditText ed_des;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);

		setContentView(R.layout.pop_family);

		initViews();
	}

	private void initViews() {
		ed_des = (EditText) findViewById(R.id.ed_des);

		btn_pass = (Button) findViewById(R.id.btn_pass);
		btn_pass.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				if (TextUtils.isEmpty(ed_des.getText().toString().trim())) {
					Toast.makeText(getApplicationContext(), "请填写信息在保存",
							Toast.LENGTH_SHORT).show();
					return;
				}
				Intent intent = new Intent();
				intent.putExtra("fdes", ed_des.getText().toString().trim());
				setResult(FORFAMILYDES, intent);
				finish();
			}
		});
	}
}
